// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

const JavaClass = 'org/cocos2dx/lib/Cocos2dxHelper';

@ccclass
export default class DeviceModule {

    static copyTextToClipboard (copyText: string) {
        if (cc.sys.os == cc.sys.OS_ANDROID) {
            jsb.reflection.callStaticMethod(
                JavaClass,  "copyTextToClipboard",
                "(Ljava/lang/String;)V",
                copyText
            );
        }
    }

    // update (dt) {}
}
